import Message from "./Message";
import { isNull } from "../../tools/Define";

export default class ReceiveMessage extends Message {
    

    // private errorCode:number = 0;

    // private errorMsg:string = "";

    private error:any;

    private updateData:any;

    // setErrorCode(code:number = 0){
    //     this.errorCode = code;
    // }

    isError():boolean{
        return !isNull(this.error)
    }
    setError(error){
        this.error = error;
    }

    getError(){
        return this.error;
    }
    getErrorCode():number{
        return this.error.code;
    } 

    // setErrorMsg(msg:string = ""):void{
    //     this.errorMsg = msg;
    // }

    getErrorMsg(){
        return this.error.message;
    }

    setUpdate(data){
        this.updateData = data;
    }

    getUpdate(){
        return this.updateData;
    }


}
